package com.xtx.controller.user;

import com.xtx.dto.OrderPageDto;
import com.xtx.result.PageResult;
import com.xtx.result.Result;
import com.xtx.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
@Slf4j
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("page")
    public Result<PageResult> page(OrderPageDto orderPageDto){
        log.info("订单分页接口");
        PageResult pageResult = orderService.page(orderPageDto);
        return Result.success(pageResult);
    }

}
